Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Cylinders

QuickDraw 3D provides routines that you can use to create and manipulate cylinders. See "Cylinders" for the definition of a cylinder.

Q3Cylinder_New

You can use the Q3Cylinder_New function to create a new cylinder.

TQ3GeometryObject Q3Cylinder_New (const TQ3CylinderData *cylinderData);
cylinderData
A pointer to a TQ3CylinderData structure.

DESCRIPTION

The Q3Cylinder_New function returns, as its function result, a new cylinder having the shape attributes specified by the cylinderData parameter. If a new cylinder could not be created, Q3Cylinder_New returns the value NULL .

Q3Cylinder_Submit

You can use the Q3Cylinder_Submit function to submit an immediate cylinder for drawing, picking, bounding, or writing.

TQ3Status Q3Cylinder_Submit (
                     const TQ3CylinderData *cylinderData,
                     TQ3ViewObject view);
cylinderData
A pointer to a TQ3CylinderData structure.
view
A view.

DESCRIPTION

The Q3Cylinder_Submit function submits for drawing, picking, bounding, or writing the immediate cylinder whose shape and attribute set are specified by the cylinderData parameter. The cylinder is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Cylinder_GetData

You can use the Q3Cylinder_GetData function to get the data that defines a cylinder and its attributes.

TQ3Status Q3Cylinder_GetData (
                     TQ3GeometryObject cylinder,
                     TQ3CylinderData *cylinderData);
cylinder
A cylinder.
cylinderData
On exit, a pointer to a TQ3CylinderData structure that contains information about the cylinder specified by the cylinder parameter.

DESCRIPTION

The Q3Cylinder_GetData function returns, through the cylinderData parameter, information about the cylinder specified by the cylinder parameter. QuickDraw 3D allocates memory for the TQ3CylinderData structure internally; you must call Q3Cylinder_EmptyData to dispose of that memory.

Q3Cylinder_SetData

You can use the Q3Cylinder_SetData function to set the data that defines a cylinder and its attributes.

TQ3Status Q3Cylinder_SetData (
                     TQ3GeometryObject cylinder,
                     const TQ3CylinderData *cylinderData);
cylinder
A cylinder.
cylinderData
A pointer to a TQ3CylinderData structure.

DESCRIPTION

The Q3Cylinder_SetData function sets the data associated with the cylinder specified by the cylinder parameter to the data specified by the cylinderData parameter.

Q3Cylinder_EmptyData

You can use the Q3Cylinder_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Cylinder_GetData .

TQ3Status Q3Cylinder_EmptyData (TQ3CylinderData *cylinderData);
cylinderData
A pointer to a TQ3CylinderData structure.

DESCRIPTION

The Q3Cylinder_EmptyData function releases the memory occupied by the TQ3CylinderData structure pointed to by the cylinderData parameter; that memory was allocated by a previous call to Q3Cylinder_GetData .

Q3Cylinder_GetOrigin

You can use the Q3Cylinder_GetOrigin function to get the origin of a cylinder.

TQ3Status Q3Cylinder_GetOrigin (
                     TQ3GeometryObject cylinder,
                     TQ3Point3D *origin);
cylinder
A cylinder.
origin
On exit, the origin of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetOrigin function returns, in the origin parameter, the origin of the cylinder specified by the cylinder parameter.

Q3Cylinder_SetOrigin

You can use the Q3Cylinder_SetOrigin function to set the origin of a cylinder.

TQ3Status Q3Cylinder_SetOrigin (
                     TQ3GeometryObject cylinder,
                     const TQ3Point3D *origin);
cylinder
A cylinder.
origin
The desired origin of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetOrigin function sets the origin of the cylinder specified by the cylinder parameter to that specified in the origin parameter.

Q3Cylinder_GetOrientation

You can use the Q3Cylinder_GetOrientation function to get the orientation of a cylinder.

TQ3Status Q3Cylinder_GetOrientation (
                     TQ3GeometryObject cylinder,
                     TQ3Vector3D *orientation);
cylinder
A cylinder.
orientation
On exit, the orientation of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetOrientation function returns, in the orientation parameter, the orientation of the cylinder specified by the cylinder parameter.

Q3Cylinder_SetOrientation

You can use the Q3Cylinder_SetOrientation function to set the orientation of a cylinder.

TQ3Status Q3Cylinder_SetOrientation (
                     TQ3GeometryObject cylinder,
                     const TQ3Vector3D *orientation);
cylinder
A cylinder.
orientation
The desired orientation of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetOrientation function sets the orientation of the cylinder specified by the cylinder parameter to that specified in the orientation parameter.

Q3Cylinder_GetMajorRadius

You can use the Q3Cylinder_GetMajorRadius function to get the major radius of a cylinder.

TQ3Status Q3Cylinder_GetMajorRadius (
                     TQ3GeometryObject cylinder,
                     TQ3Vector3D *majorRadius);
cylinder
A cylinder.
majorRadius
On exit, the major radius of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetMajorRadius function returns, in the majorRadius parameter, the major radius of the cylinder specified by the cylinder parameter.

Q3Cylinder_SetMajorRadius

You can use the Q3Cylinder_SetMajorRadius function to set the major radius of a cylinder.

TQ3Status Q3Cylinder_SetMajorRadius (
                     TQ3GeometryObject cylinder,
                     const TQ3Vector3D *majorRadius);
cylinder
A cylinder.
majorRadius
The desired major radius of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetMajorRadius function sets the major radius of the cylinder specified by the cylinder parameter to that specified in the majorRadius parameter.

Q3Cylinder_GetMinorRadius

You can use the Q3Cylinder_GetMinorRadius function to get the minor radius of a cylinder.

TQ3Status Q3Cylinder_GetMinorRadius (
                     TQ3GeometryObject cylinder,
                     TQ3Vector3D *minorRadius);
cylinder
A cylinder.
minorRadius
On exit, the minor radius of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetMinorRadius function returns, in the minorRadius parameter, the minor radius of the cylinder specified by the cylinder parameter.

Q3Cylinder_SetMinorRadius

You can use the Q3Cylinder_SetMinorRadius function to set the minor radius of a cylinder.

TQ3Status Q3Cylinder_SetMinorRadius (
                     TQ3GeometryObject cylinder,
                     const TQ3Vector3D *minorRadius);
cylinder
A cylinder.
minorRadius
The desired minor radius of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetMinorRadius function sets the minor radius of the cylinder specified by the cylinder parameter to that specified in the minorRadius parameter.

Q3Cylinder_GetCaps

You can use the Q3Cylinder_GetCaps function to get the style of caps of a cylinder.

TQ3Status Q3Cylinder_GetCaps (
                     TQ3GeometryObject cylinder,
                     TQ3EndCap *caps);
cylinder
A cylinder.
caps
On exit, the caps style of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetCaps function returns, in the caps parameter, the style of caps of the cylinder specified by the cylinder parameter.

Q3Cylinder_SetCaps

You can use the Q3Cylinder_SetCaps function to set the style of caps of a cylinder.

TQ3Status Q3Cylinder_SetCaps (
                     TQ3GeometryObject cylinder,
                     TQ3EndCap caps);
cylinder
A cylinder.
caps
The desired style of end caps of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetCaps function sets the style of end caps of the cylinder specified by the cylinder parameter to that specified in the caps parameter.

Q3Cylinder_GetTopAttributeSet

You can use the Q3Cylinder_GetTopAttributeSet function to get the top attribute set of a cylinder.

TQ3Status Q3Cylinder_GetTopAttributeSet (
                     TQ3GeometryObject cylinder,
                     TQ3AttributeSet *topAttributeSet);
cylinder
A cylinder.
topAttributeSet
On exit, the attribute set of the top of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetTopAttributeSet function returns, in the topAttributeSet parameter, the attribute set of the top of the cylinder specified by the cylinder parameter. The reference count of the set is incremented.

Q3Cylinder_SetTopAttributeSet

You can use the Q3Cylinder_SetTopAttributeSet function to set the top attribute set of a cylinder.

TQ3Status Q3Cylinder_SetTopAttributeSet (
                     TQ3GeometryObject cylinder,
                     TQ3AttributeSet topAttributeSet);
cylinder
A cylinder.
topAttributeSet
The desired attribute set of the top of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetTopAttributeSet function sets the attribute set of the top of the cylinder specified by the cylinder parameter to that specified in the topAttributeSet parameter.

Q3Cylinder_GetFaceAttributeSet

You can use the Q3Cylinder_GetFaceAttributeSet function to get the face attribute set of a cylinder.

TQ3Status Q3Cylinder_GetFaceAttributeSet (
                     TQ3GeometryObject cylinder,
                     TQ3AttributeSet *faceAttributeSet);
cylinder
A cylinder.
faceAttributeSet
On exit, the attribute set of the face of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetFaceAttributeSet function returns, in the faceAttributeSet parameter, the attribute set of the face of the cylinder specified by the cylinder parameter. The reference count of the set is incremented.

Q3Cylinder_SetFaceAttributeSet

You can use the Q3Cylinder_SetFaceAttributeSet function to set the face attribute set of a cylinder.

TQ3Status Q3Cylinder_SetFaceAttributeSet (
                     TQ3GeometryObject cylinder,
                     TQ3AttributeSet faceAttributeSet);
cylinder
A cylinder.
faceAttributeSet
The desired attribute set of the face of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetFaceAttributeSet function sets the attribute set of the face of the cylinder specified by the cylinder parameter to that specified in the faceAttributeSet parameter.

Q3Cylinder_GetBottomAttributeSet

You can use the Q3Cylinder_GetBottomAttributeSet function to get the bottom attribute set of a cylinder.

TQ3Status Q3Cylinder_GetBottomAttributeSet (
                     TQ3GeometryObject cylinder,
                     TQ3AttributeSet *bottomAttributeSet);
cylinder
A cylinder.
bottomAttributeSet
On exit, the attribute set of the bottom of the specified cylinder.

DESCRIPTION

The Q3Cylinder_GetBottomAttributeSet function returns, in the bottomAttributeSet parameter, the attribute set of the bottom of the cylinder specified by the cylinder parameter. The reference count of the set is incremented.

Q3Cylinder_SetBottomAttributeSet

You can use the Q3Cylinder_SetBottomAttributeSet function to set the bottom attribute set of a cylinder.

TQ3Status Q3Cylinder_SetBottomAttributeSet (
                     TQ3GeometryObject cylinder,
                     TQ3AttributeSet bottomAttributeSet);
cylinder
A cylinder.
bottomAttributeSet
The desired attribute set of the bottom of the specified cylinder.

DESCRIPTION

The Q3Cylinder_SetBottomAttributeSet function sets the attribute set of the bottom of the cylinder specified by the cylinder parameter to that specified in the bottomAttributeSet parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |